﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ChiTiet.aspx.cs" Inherits="ChiTiet"
    MasterPageFile="~/Site.master" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        table
        {
            font: 11px/24px Verdana, Arial, Helvetica, sans-serif;
            border-collapse: collapse;
            width: 95%;
            border-right: 1px solid #CCC;
            border-top: 1px solid #CCC;
            margin: 10px;
        }
        
        th
        {
            padding: 0 0.5em;
            text-align: left;
        }
        
        tr.yellow td
        {
            border-top: 1px solid #FB7A31;
            border-bottom: 1px solid #FB7A31;
            background: #FFC;
        }
        
        td
        {
            border-bottom: 1px solid #CCC;
            padding: 0 0.5em;
            border-left: 1px solid #CCC;
        }
        
        td.width
        {
            width: 100px;
        }
        
        td.adjacent
        {
            text-align: center;
        }
        
        .tenxe
        {
            float: left;
            border: solid 1px #CCCCCC;
            height: 50px;
            margin: 10px;
            padding: 5px;
            font-size: large;
            width: 200px;
        }
        .giaxe
        {
            float: left;
            border: solid 1px #CCCCCC;
            height: 50px;
            margin: 10px;
            padding: 5px;
            background: none repeat scroll 0 0 #38231e;
            color: #FFF;
            text-align: justify;
            font-size: large;
            width: 150px;
        }
        .textright
        {
            text-align: right;
            width: 98%;
        }
    </style>
    <%--
    --%><script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <%--<script type="text/javascript">
        $(document).ready(function () {
            $('#txtSoLuong').change(function () {
                var a = $('#txtThanhTien').val()
                $('#txtThanhTien').val('aaa');
            });
        });
    </script>--%>
</asp:Content>
<asp:Content ID="DetailContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:HiddenField ID="hGiaBan" Value="0" runat="server" />
    <div>
        <%
            System.Data.DataSet ds = new System.Data.DataSet();
            string id = Request.QueryString["MaXe"];
            OTOWeb.DataOut ot = new OTOWeb.DataOut();
            ds = ot.Web_LoadSanPhamChiTiet(id);
            if (ds.Tables[0].Rows.Count <= 0)
            {
                Response.Redirect("404.aspx");
            }
            hGiaBan.Value = Convert.ToDouble(ds.Tables[0].Rows[0]["GIABAN"]).ToString();
        %>
        <div style="float: left; border: solid 1px #CCCCCC; margin: 10px;">
            <img src="<%Response.Write(ds.Tables[0].Rows[0]["HINHANH"].ToString()); %>" width="230"
                height="230" alt="">
        </div>
        <div style="float: left; border: solid 1px #CCCCCC; margin: 10px;">
            <div style="height: 90px;">
                <div class="tenxe">
                    <%Response.Write(ds.Tables[0].Rows[0]["TENXE"].ToString()); %>
                </div>
                <div class="giaxe">
                    <strong>Giá:</strong><br />
                    <%Response.Write(Convert.ToDecimal(ds.Tables[0].Rows[0]["GIABAN"]).ToString("0,0.0"));%>$
                </div>
            </div>
            <div>
                <div style="background: none repeat scroll 0 0 #38231e; color: #FFF; padding: 5px;">
                    <strong>THÔNG TIN CHI TIẾT</strong></div>
                <table width="98%" cellspacing="0" cellpadding="10">
                    <tr>
                        <td>
                            Màu sắc:
                        </td>
                        <td>
                            <%Response.Write(ds.Tables[0].Rows[0]["MAUSAC"].ToString()); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Xuất xứ:
                        </td>
                        <td>
                            <%Response.Write(ds.Tables[0].Rows[0]["XUATXU"].ToString()); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Nhiên liệu:
                        </td>
                        <td>
                            <%Response.Write(ds.Tables[0].Rows[0]["NHIENLIEU"].ToString()); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Số chỗ
                        </td>
                        <td>
                            <%Response.Write(ds.Tables[0].Rows[0]["SOCHO"]); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Số cửa
                        </td>
                        <td>
                            <%Response.Write(ds.Tables[0].Rows[0]["SOCUA"]); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Hộp số
                        </td>
                        <td>
                            <%Response.Write(ds.Tables[0].Rows[0]["HOPSO"]); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Hệ thống phanh
                        </td>
                        <td>
                            <%Response.Write(ds.Tables[0].Rows[0]["HETHONGPHANH"].ToString()); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Dung tích bình nhiên liệu:
                        </td>
                        <td>
                            <%Response.Write(Convert.ToInt32(ds.Tables[0].Rows[0]["DUNGTICHBINHNHIENLIEU"])); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Dung tích xi lanh
                        </td>
                        <td>
                            <%Response.Write(ds.Tables[0].Rows[0]["DUNGTICHXILANH"].ToString()); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Trọng lượng
                        </td>
                        <td>
                            <%Response.Write(Convert.ToInt32(ds.Tables[0].Rows[0]["TRONGLUONG"])); %>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Thiết bị định vị
                        </td>
                        <td>
                            <%
                                string urlimg = "";
                                if (ds.Tables[0].Rows[0]["THIETBIDINHVI"].ToString() == "True")
                                    urlimg = "images/check-icon.png";
                                else
                                    urlimg = "images/no-icon.png"; %>
                            <img src="<%Response.Write(urlimg);%>" alt="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Tay lái trợ lực
                        </td>
                        <td>
                            <%
                                if (ds.Tables[0].Rows[0]["TAYLAITROLUC"].ToString() == "True")
                                    urlimg = "images/check-icon.png";
                                else
                                    urlimg = "images/no-icon.png"; %>
                            <img src="<%Response.Write(urlimg);%>" alt="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Điều hòa
                        </td>
                        <td>
                            <%
                                if (ds.Tables[0].Rows[0]["DIEUHOA"].ToString() == "True")
                                    urlimg = "images/check-icon.png";
                                else
                                    urlimg = "images/no-icon.png"; %>
                            <img src="<%Response.Write(urlimg);%>" alt="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Thiết bị giải trí
                        </td>
                        <td>
                            <%
                                if (ds.Tables[0].Rows[0]["THIETBIGIAITRI"].ToString() == "True")
                                    urlimg = "images/check-icon.png";
                                else
                                    urlimg = "images/no-icon.png"; %>
                            <img src="<%Response.Write(urlimg);%>" alt="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Túi khí an toàn
                        </td>
                        <td>
                            <%
                                if (ds.Tables[0].Rows[0]["TUIKHIANTOAN"].ToString() == "True")
                                    urlimg = "images/check-icon.png";
                                else
                                    urlimg = "images/no-icon.png"; %>
                            <img src="<%Response.Write(urlimg);%>" alt="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Hệ thống báo trộm
                        </td>
                        <td>
                            <%
                                if (ds.Tables[0].Rows[0]["HETHONGBAOTROM"].ToString() == "True")
                                    urlimg = "images/check-icon.png";
                                else
                                    urlimg = "images/no-icon.png"; %>
                            <img src="<%Response.Write(urlimg);%>" alt="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Chống bó cứng phanh
                        </td>
                        <td>
                            <%
                                if (ds.Tables[0].Rows[0]["CHONGBOCUNGPHANH"].ToString() == "True")
                                    urlimg = "images/check-icon.png";
                                else
                                    urlimg = "images/no-icon.png"; %>
                            <img src="<%Response.Write(urlimg);%>" alt="">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Điều khiển hành trình
                        </td>
                        <td>
                            <%
                                if (ds.Tables[0].Rows[0]["DIEUKHIENHANHTRINH"].ToString() == "True")
                                    urlimg = "images/check-icon.png";
                                else
                                    urlimg = "images/no-icon.png"; %>
                            <img src="<%Response.Write(urlimg);%>" alt="">
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div style="float: left; height: 500px; margin: 10px; border: solid 1px #CCC; width: 260px;">
            <div style="background: none repeat scroll 0 0 #38231e; color: #FFF; padding: 5px;">
                <strong>ĐẶT HÀNG</strong></div>
            <table width="95%">
                <tr>
                    <td>
                        Đơn giá
                    </td>
            
                    <td style="text-align: right;">
                           <%TextBox1.Text= (Convert.ToDecimal(ds.Tables[0].Rows[0]["GIABAN"]).ToString("0,0.0"));%>  
                     <asp:TextBox ID="TextBox1" runat="server" Text="" MaxLength="5" CssClass="textright"></asp:TextBox>
                                          
                    </td>
                </tr>
                <tr>
                    <td>
                        Số lượng
                    </td>
                    <td>
                        <asp:TextBox ID="txtSoLuong" runat="server" Text="" MaxLength="5" CssClass="textright"></asp:TextBox>
                    </td>
                </tr>                
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/icon_dathang.png"
                            OnClick="btnDat_Click"/>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
